package ma.cdm.compteRendu.bo;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ParticipantInterneId entity. @author Limouri Anouar
 */
@Embeddable

public class ParticipantInterneId  implements java.io.Serializable {

	// Fields

	private Long idcompterendu;
	private String matricule;

	// Constructors

    /** default constructor */
    public ParticipantInterneId() {
    }

    
    /** full constructor */
    public ParticipantInterneId(Long idcompterendu, String matricule) {
        this.idcompterendu = idcompterendu;
        this.matricule = matricule;
    }

	// Property accessors

	@Column(name = "IDCOMPTERENDU", nullable = false)
	public Long getIdcompterendu() {
		return this.idcompterendu;
	}

	public void setIdcompterendu(Long idcompterendu) {
		this.idcompterendu = idcompterendu;
	}

	@Column(name = "MATRICULE", nullable = false, length = 20)
	public String getMatricule() {
		return this.matricule;
	}

	public void setMatricule(String matricule) {
		this.matricule = matricule;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ParticipantInterneId))
			return false;
		ParticipantInterneId castOther = (ParticipantInterneId) other;

		return ((this.getIdcompterendu() == castOther.getIdcompterendu()) || (this
				.getIdcompterendu() != null
				&& castOther.getIdcompterendu() != null && this
				.getIdcompterendu().equals(castOther.getIdcompterendu())))
				&& ((this.getMatricule() == castOther.getMatricule()) || (this
						.getMatricule() != null
						&& castOther.getMatricule() != null && this
						.getMatricule().equals(castOther.getMatricule())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getIdcompterendu() == null ? 0 : this.getIdcompterendu()
						.hashCode());
		result = 37 * result
				+ (getMatricule() == null ? 0 : this.getMatricule().hashCode());
		return result;
	}

}